package com.brtbeacon.demo.lot.state;

import android.content.Context;
import android.view.View;

import androidx.fragment.app.Fragment;

import com.brtbeacon.demo.lot.LotMapActivity;
import com.brtbeacon.locationengine.ble.BRTLocationManager;
import com.brtbeacon.locationengine.ble.BRTPublicBeacon;
import com.brtbeacon.map.map3d.BRTMapView;
import com.brtbeacon.map.map3d.entity.BRTPoi;
import com.brtbeacon.map.map3d.entity.BRTPoint;
import com.brtbeacon.map.map3d.route.BRTMapRouteManager;
import com.brtbeacon.map.map3d.route.BRTRouteResult;
import com.brtbeacon.mapdata.BRTLocalPoint;

import java.util.List;

public class ParkingState {

    protected LotMapActivity activity;

    /**
     * 终点选择状态
     */
    public final static int PARKING_STATE_TARGET = 0;

    /**
     * 导航等待状态（已起始点，等待导航开启）
     */
    public final static int PARKING_STATE_ROUTE = 1;

    /**
     * 导航进行状态
     */
    public final static int PARKING_STATE_NAVIGATION = 2;

    /**
     * 搜寻定位状态
     */
    public final static int PARKING_STATE_WAIT_LOCATION = 3;

    public void enter(LotMapActivity activity) {
        this.activity = activity;
    }

    public void exit() {
        this.activity = null;
    }

    public void onClickAtPoint(BRTMapView mapView, BRTPoint point) {

    }

    public void onPoiSelected(BRTMapView brtMapView, List<BRTPoi> list) {

    }

    public void onFocusLocation() {
        this.activity.focusLocation();
    }

    public void didUpdateLocation(BRTLocationManager BRTLocationManager, BRTLocalPoint tyLocalPoint) {
        this.activity.setLocation(tyLocalPoint);
    }

    public void didSolveRouteWithResult(BRTMapRouteManager routeManager, BRTRouteResult routeResult) {

    }

    public void onFragmentAttach(Context context, Fragment fragment) {

    }

    public void onFragmentDetach(Fragment fragment) {

    }

    public void onFragmentViewCreated(Fragment fragment, View view) {

    }

    public void didRangedLocationBeacons(BRTLocationManager brtLocationManager, List<BRTPublicBeacon> list) {
    }
}
